package com.solution.admin.point.service.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.solution.admin.point.dao.SignPointSettingsDao;
import com.solution.admin.point.entity.SignPointSettingsEntity;
import com.solution.admin.point.service.SignPointSettingsService;

import com.solution.common.dao.BaseDao;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;
import com.solution.common.service.impl.BaseServiceImpl;
import com.solution.common.utils.string.StringUtil;

/**
 * 签到积分设置信息service实现层
 * @author xu_cc
 * @date 2017-10-20 14:18:43
 */
@Service
public class SignPointSettingsServiceImpl extends BaseServiceImpl<SignPointSettingsEntity> implements SignPointSettingsService {

    /**
     * 签到积分设置信息接口
     */
    @Autowired
    private SignPointSettingsDao signPointSettingsDao;

    protected BaseDao<SignPointSettingsEntity> getDao() {
        return this.signPointSettingsDao;
    }

    /**
     * 保存签到积分设置信息
     * @param signPointSettingsEntity 签到积分设置信息实体
     * @return Long 添加成功签到积分设置信息的ID
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    public long saveSignPointSettings(SignPointSettingsEntity signPointSettingsEntity) {
        return signPointSettingsDao.saveSignPointSettings(signPointSettingsEntity);
    }

    /**
     * 分页查询签到积分设置信息
     * @param pageParam 分页参数
     * @param paramMap 查询参数
     * @return PageBean 分页参数和分页数据
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    @Override
    public PageBean listSignPointSettingsPage(PageParam pageParam, Map<String, Object> paramMap) {
        return signPointSettingsDao.listSignPointSettingsPage(pageParam, paramMap);
    }
    
    /**
     * 根据ID查询用户信息
     * @param id 用户id
     * @return signPointSettingsEntity 用户对象
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    public SignPointSettingsEntity getSignPointSettingsById(Long id) {
        return signPointSettingsDao.getById(id.longValue());
    }

    /**
     * 更新用户
     * @param signPointSettingsEntity 用户实体
     * @return Long 更新是否成功，>1代表更新成功
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    @Override
    public int updateSignPointSettings(SignPointSettingsEntity signPointSettingsEntity) {
        return signPointSettingsDao.updateSignPointSettings(signPointSettingsEntity);
    }
    
    
    /**
     * 根据条件查询签到积分设置信息
     * @param param
     * @return 数据列表
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    @Override
    public List<SignPointSettingsEntity> listSignPointSettings( Map<String, Object> param){
        return  signPointSettingsDao.listSignPointSettings(param);
    }
    
    /**
     * 删除签到积分设置信息
     * @param 
     * @return int 返回删除记录条数
     * @author xu_cc
     * @date 2017-10-20 14:18:43
     */
    public int deleteSignPointSettingsById(long id){
        return  signPointSettingsDao.deleteById(id);
    }
    
}
